package com.thirteengroup.casemg.service.impl;

import com.thirteengroup.casemg.Mapper.customerMapper;
import com.thirteengroup.casemg.Mapper.tracehistoryMapper;
import com.thirteengroup.casemg.domain.queryObject;
import com.thirteengroup.casemg.domain.tracehistory;
import com.thirteengroup.casemg.service.ITracehistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TraceHistoryService implements ITracehistoryService {

    @Autowired
    tracehistoryMapper tracehistoryMapper;
//    @Autowired
//    customerMapper customerMapper;

    @Override
    public List<tracehistory> queryAllLimit(queryObject queryObject) {
        List<tracehistory> tracehistories = tracehistoryMapper.selectAllLimit(queryObject);
        return tracehistories ;
    }

    @Override
    public tracehistory queryOne(Long id) {
        return tracehistoryMapper.selectOne(id);
    }

    @Override
    public tracehistory queryOneBycid(Long cid) {
        tracehistory tracehistory = tracehistoryMapper.selectOneBycid(cid);
        return tracehistory;
    }

    @Override
    public Integer queryCount() {
        return tracehistoryMapper.selectCount();
    }

    @Override
    public void insert(tracehistory ty) {
        tracehistoryMapper.insert(ty);
    }

    @Override
    public void delete(Long id) {
        tracehistoryMapper.delete(id);
    }

    @Override
    public void update(tracehistory ty) {
        tracehistoryMapper.update(ty);
    }
}
